package com.chj.resource;

import java.security.Principal;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class Oauth2Resources {

	protected static Logger logger = LoggerFactory.getLogger(Oauth2Resources.class);

	@GetMapping("/oauth/user")
	public Principal getCurrentOauthUserInfo(Principal principal) {
		logger.info("*****************getCurrentOauthUserInfo = " + principal);
		return principal;
	}

}
